home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
map100p.zip
/
MAP.DOC
< prev
next >
Wrap
Text File
|
1991-11-02
|
8KB
|
249 lines
╔══════════════════════════════════════════════════════════╗
║ M A P ║
║ A Turbo Pascal ver 6.0 TPU Unit ║
║ ║
║ Copyrighted (C) John H. Gohde, 1991 ║
║ All Rights Reserved ║
║ ║
║ FreeWare licensed for NON-Commercial use. ║
╚══════════════════════════════════════════════════════════╝
Page 1 11-02-91
INTRODUCTION
MAP is a Turbo Pascal version 6.0 Unit that provides
support for limited bit and nibble mapping functions on
words and bytes.
This is a FreeWare unit that comes complete with Source
Code.
This is the unit that is required by ALPHA version
1.00.
The enclosed MAP unit requires Turbo Pascal version
6.0, which is not included.
COPYRIGHT NOTICE
Both the software and its documentation are copyrighted
materials. I reserve all rights to these materials
under United States law and international copyright
conventions which are not expressly granted to the
user. No part of this material may be reproduced or
modified in any way without my prior, expressed written
permission. This document is NOT Public Domain. It is
intended as an informational document for evaluative
purposes and for use by Registered users. This Document
may be copied in whole for that intent only.
DISCLAIMER
I EXPRESSLY DISCLAIM ALL WARRANTIES INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE AND MERCHANTABILITY. YOU USE BOTH THE SOFTWARE
AND DOCUMENTATION AT YOUR OWN RISK!
LICENSE
I grant all users of this software and documentation a
limited license for their own private noncommercial
use. I expressly forbid any user from making any
changes to either the software or documentation or from
profiting from its distribution.
I grant all BBS's and software distributors the right
to distribute this software and to charge a maximum
distribution fee of $5.00.
Page 2 11-02-91
TRADEMARKS
Turbo Pascal and all other Borland products are
trademarks or registered trademarks of Borland
International, Inc.. Portions of the enclosed Turbo
Pascal unit(s) are Copyrighted (C) 1983,1990 by Borland
International as it/they were compiled with Turbo
Pascal.
Any other brand or products names mentioned in this
document are trademarks or registered trademarks of
their respective holders.
BACKGROUND INFORMATION
This unit provides the limited bit and nibble mapping
functions required by my ALPHA unit distributed
separatedly in error without this unit.
It is being distributed as FreeWare complete with
source code, as it will probably not be supported with
future updates.
Page 3 11-02-91
TYPES
Str16 = string[16];
FlagPos = 1..16;
----------------------
A flag is defined by me as the bits of a word; and are
numbered from left to right.
NibblePos = 1..4;
---------------------
A nibble is defined by me as half a byte or 4 bits. A
word has bytes or four nibbles; which are numbered from
left to right.
Flags = word;
---------------------
A word which is defined to consist of 16 flags or bits.
FUNCTIONS
Function FlagsOn(F : Flags; NUM : FlagPos): Boolean;
-----------------------------------------------------
A function that tells you if flag NUM is turn on or
off.
Function GetDoubleByte( VAR DB : word; NUM : NibblePos): byte;
---------------------------------------------------------------
Returns the value of nibble NUM from the word DB.
Function GetHiNibble( DN : byte): byte;
----------------------------------------
Returns the value of the HI nibble in a byte.
Function GetLoNibble( DN : byte): byte;
----------------------------------------
Returns the value of the LO nibble in a byte.
Procedure SetDoubleByte( VAR DB : word; NUM : NibblePos; Value: Byte);
----------------------------------------------------------------------
Sets the nibble number NUM to VALUE in the word DB.
Procedure SetFlags( VAR F : Flags; NUM : FlagPos; SW: Boolean);
---------------------------------------------------------------
Sets the Flag numbered NUM to the boolean SW in the
word F.
Function SetHiNibble( DN,Hi: byte): byte;
------------------------------------------
Sets the HI nibble in byte DN to the value HI.
Function SetLoNibble( DN,Lo: byte): byte;
------------------------------------------
Sets the LO nibble in byte DN to the value LO.
Function SwapNibbles( DN : byte): byte;
----------------------------------------
Swaps the values of the HI and LO nibbles in the byte
DN.
Page 4 11-02-91
Procedure ToggleFlags( VAR F : Flags; NUM : FlagPos);
-----------------------------------------------------
Reverses the value of flag NUN in word F.
Function Flags2Str( F: Flags): str16;
--------------------------------------
Prints the values of all 16 flags in word F in
sequence.
Page 5 11-02-91
PRODUCT SUPPORT
This product is supported by the author via a product
support echo on a 24 hour a day BBS. First, time
callers may download the latest versions of my
products.
You can contact me by data phone (8N1 1200/2400 BAUD)
at:
╔═══════════════════════════════╗
║ The FreeBoard BBS ║
║ (804)744-0744 ║
║ Richmond, Va. ║
╚═══════════════════════════════╝
The FreeBoard BBS is a multi-node RBBS-PC board on the
Fido Net Work with over 400 MEG's of files.
And, of course, you can ask your SYSOP to FREQ this or
any other files from this board with the following
info:
1:264/212,The_FreeBoard_BBS,Midlothian_VA,Bill_Hunter,
1-804-744-0797,9600,CM,XX,LO,HST
The support echo is called LZE-WC. You arrive at this
conference from the MAIN menu by joining it as follows:
J
LZE-WC
The author may also be contacted by writing to:
JOHN GOHDE
MAP
P O BOX 17581
RICHMOND, VA 23226-7581
If you expect a response, be sure to include a self
addressed and stamped return envelop!
Page 6 11-02-91
UPDATE HISTORY
VERSION 1.00 -- originally released on 11-02-91